<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html >
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="stylesheet" type="text/css" href="./Style/skin.css" />
    <script src="Js/jquery-3.3.1.min.js"></script>
    <script>
       //图片预览
       function getFullPath(obj){
           if (obj){
               //ie
               if (window.navigator.userAgent.indexOf("MSIE") >= 1){
                   obj.select();
                   return document.selection.createRange().text;
               }else if (window.navigator.userAgent.indexOf("Firefox") >= 1){
                   //firefox　
                   return window.URL.createObjectURL(obj.files.item(0));
               }else if(navigator.userAgent.indexOf("Chrome")>0){
                   //chrome
                   return window.URL.createObjectURL(obj.files.item(0));
               }
               return obj.value;
           }
       }
       $(function(){
           $("#pic").change(function(){
               var path = getFullPath($(this)[0]);
             $("#imgPic").prop("src",path);
               
              
           });
       });
    </script>
</head>
    <body>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!-- 头部开始 -->
            <tr>
               <td colspan="3"  valign="top" background="./Images/context.png">
                   <img src="Images/context.png" >
               </td>
            <!-- 中间部分开始 -->
            <tr>
                
                <!--第一行中间内容-->
                <td valign="top" bgcolor="#ffffff">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <!-- 空白行-->
                        <tr><td colspan="2" valign="top">&nbsp;</td><td>&nbsp;</td><td valign="top">&nbsp;</td></tr>
                        <tr>
                            <td colspan="4">
                                <table>
                                    <tr>
                                        <td width="100" align="center"><img src="./Images/mime.gif" /></td>
                                        <td valign="bottom"><h3 style="letter-spacing:1px;">书籍管理 > 添加书籍</h3></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 一条线 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 添加产品开始 -->
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="96%">
                                <table width="100%">
                                    <tr>
                                        <td colspan="2">
                                            <form action="book.let?type=add" method="post" >
                                                <table width="100%"class="cont">
                                                    <tr>
                                                        <td width="2%">&nbsp;</td>
                                                        <td width="15%">名称：</td>
                                                        <td width="25%"><input class="text" type="text" name="name" value="" required/></td>
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>

                                                        <td width="2%">&nbsp;</td>
                                                        <td>库存量：</td>
                                                        <td width="20%"><input class="text" style="width:50px;" type="number" name="stock" value="100"  required/></td>
                                                        
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="2%">&nbsp;</td>
                                                        <td>单价：</td>
                                                        <td width="20%"><input class="text" style="width:100px;" type="text" name="price" required /></td>
                                                        
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="2%">&nbsp;</td>
                                                        <td>出版社：</td>
                                                        <td width="20%"><input class="text"  type="text" name="publish" required/></td>
                                                        <td></td>
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="2%">&nbsp;</td>
                                                        <td>作者:</td>
                                                        <td width="20%"><input class="text"  type="text" name="author" required/></td>
                                                        <td></td>
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td width="2%">&nbsp;</td>
                                                        <td>存放地址:</td>
                                                        <td width="20%"><input class="text"  type="text" name="address"/></td>
                                                        <td></td>
                                                        <td width="2%">&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td>&nbsp;</td>
                                                        <td>简介：</td>
                                                        <td colspan="2"><textarea cols="150" rows="20" name="desc"></textarea></td>
                                                        <td></td>
                                                    </tr>
                                                    <tr>
                                                        <td>&nbsp;</td>
                                                        <td></td>
                                                        <td colspan="3"><input class="btn" type="submit" value="提交" /></td>
                                 
                                                    </tr>
                                                </table>
                                            </form>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="2%">&nbsp;</td>
                        </tr>
                        <!-- 添加产品结束 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="51%" class="left_txt">
                                
                            <td>&nbsp;</td><td>&nbsp;</td>
                        </tr>
                    </table>
                </td>
               
            </tr>
            <!-- 底部部分 -->
            <tr>
 <td colspan="3"  valign="top" background="Images/U3%25~J%7B$@OG%5D%60(1UF%7DW)UIGO.png">
                    <img src="Images/U3%25~J%7B$@OG%5D%60(1UF%7DW)UIGO.png" >
                </td>
            </tr>
        </table>
    </body>
</html>